// pages/wallet/wallet.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    balance:0
  },

  onShow: function () {
    wx.showLoading({
    })

    let phoneNumber = wx.getStorageSync('userInfo').account

    wx.cloud.callFunction({
      name:"getUserData",
      data:{
        account:phoneNumber
      }
    }).then(res=>{
      let balance = (res.result.data[0].balance).toFixed(2)
      this.setData({
        balance,
      })
      wx.hideLoading({
      })
    })
  },

  chongzhi(){

  }
})